package com.edu.demo.service;

import com.edu.demo.entity.Contract;
import com.baomidou.mybatisplus.extension.service.IService;
import com.edu.demo.exception.BadCreditException;
import org.springframework.security.authentication.BadCredentialsException;

import java.util.List;
import java.util.Map;

/**
 * 合同表 服务类
 * </p>
 *
 * @author jixuewei
 * @since 2023-01-12
 */
public interface IContractService extends IService<Contract> {

    /**
     * 添加合同：教师录用学生
     * @param contract
     * @return
     */
    boolean addContract(Contract contract) throws BadCreditException;

    /**
     * 教师查看项目已经签订的合同
     */
    Map<String,Object> list(Integer projectId);

    /**
     * 学生查看某个项目的合同
     * @param projectId
     * @return
     */
    Contract contractOfStudent(Integer projectId);
}
